package com.example.proxy;

/**
 * Description:
 * User: 阿宾
 * Date: 2025-05-04
 * Time: 18:21
 */
public class HouseProxy implements HouseSubject{

    /*private RealHouseSubject realHouseSubject;*/
    private HouseSubject target;

    public HouseProxy(HouseSubject target) {
        this.target = target;
    }

    @Override
    public void rentHouse() {
        //出租前
        System.out.println("我是中介，开始代理");
        //开始出租房子
        /*realHouseSubject.rentHouse();*/
        target.rentHouse();
        //出租后
        System.out.println("我是中介，结束代理");
    }

    @Override
    public void saleHouse() {

    }
}
